<?php
/**
* This will return a list of tags with the starting POST prefix..
*
* @package folio
*/

    require_once("../../../includes.php");
    require_once("../model/tags.php");

    global $CFG;
    $prefix = folio_clean( $_GET['query']);

    $tags = folio_tags::SelectWherePrefix( $prefix) ;
    $run_result = array();

    if( count($tags) > 0 )
        foreach( $tags as $tag )
            $run_result[] = $tag->tag . ',' . $tag->count;

    $tags = implode(';', $run_result);
    echo $tags;
?>
